<?php
interface Model_UserService {
	/**
	 * Find user information by it's ID
	 * 
	 * @param int $userID
	 * @return Model_Entity_User
	 * @throws Exception
	 */
	public function find($userID);
	
	/**
	 * Find user information by it's Username
	 * 
	 * @param String $username
	 * @return Model_Entity_User
	 * @throws Exception
	 */
	public function findByUsername($username);
	
	/**
     * Search for users matching search criteria based on fullname and nickname
     * contents
     * If no criteria are specified it will return the entire list of feeds
     * in the system
     * 
     * @param array $criteria an optional associative array 
     * @return Zend_Paginator_Adapter_Interface
     */
    public function searchUsers($criteria = null);
    
	/**
	 * Load information of all user present in the system
	 * 
	 * @return array of Model_Entity_User
	 * @throws Exception
	 */
	//public function fetchAll();
	
	/**
	 * Save user information
	 * 
	 * @param Model_Entity_User $user
	 * @return void
	 * @throws Exception
	 */
	public function save(Model_Entity_User $user);
	
	/**
	 * Edit user information
	 * 
	 * @param Model_Entity_User $user
	 * @return void
	 * @throws Exception
	 */
	public function edit(Model_Entity_User $user);
	
	/**
	 * Edit user profile information
	 * 
	 * @param Model_Entity_UserProfile $profile
	 * @return void
	 * @throws Exception
	 */
	public function editProfile(Model_Entity_UserProfile  $profile);
	
	/**
	 * Lock/Unlock user account
	 * 
	 * @param Model_Entity_User $user
	 * @return void
	 */
	public function setUserLock($user);
}